<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core" xmlns:o="http://omnifaces.org/ui" xmlns:p="http://primefaces.org/ui">
<f:view>
    <h:head>
        <meta http-equiv="Cache-Control" content="no-store"/>
        <meta http-equiv="Pragma" content="no-cache"/>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
        <link rel="icon" href="#{request.contextPath}/images/favicon.ico"/>
        <title><ui:insert name="title">Home</ui:insert> | #{text['webapp.name']}</title>
        <ui:include src="/common/assets.xhtml"/>
    </h:head>

    <body id="#{bodyId}">
    <c:set var="currentMenu"><ui:insert name="menu"/></c:set>
    <h:panelGroup layout="block" rendered="#{p:ifAnyGranted('ROLE_ANONYMOUS,ROLE_ADMIN,ROLE_USER')}">
    	<ui:include src="/common/menu-top.xhtml"/>
	</h:panelGroup>
	<div class="container col-lg-3">
			<h:panelGroup layout="block" rendered="#{menu == 'AdminMenu'}">
				<ui:include src="/common/menu-admin.xhtml" />
			</h:panelGroup>
			<h:panelGroup layout="block" rendered="#{menu == 'ClasseMenu'}">
				<ui:include src="/common/menu-classe.xhtml" />
			</h:panelGroup>
			<h:panelGroup layout="block" rendered="#{menu == 'EleveMenu'}">
				<ui:include src="/common/menu-eleve.xhtml" />
			</h:panelGroup>
	</div>
   	<div class="col-lg-9">
   		<div class="container" id="content">
	        <o:resourceInclude path="/common/messages.jsp"/>
	        <div class="row">
	            <ui:insert name="body"/>
	        </div>
	     </div>
    </div>

    <div id="footer" class="container">
        <span class="col-sm-5 text-left">#{text['webapp.version']} </span>
        <span class="col-sm-2 text-center">
        	<p:graphicImage url="/images/logo.png" width="80%" />
        </span>
        <span class="col-sm-5 text-right" >
            &#169; #{text['copyright.year']} <a href="#">#{text['company.name']}</a>
        </span>
    </div>

	<p:ajaxStatus
		style="width:64px;height:64px;position:fixed;right:5px;bottom:5px">
		<f:facet name="start">
			<p:graphicImage value="/images/ajax-loader.gif" />
		</f:facet>

		<f:facet name="complete">
			<h:outputText value="" />
		</f:facet>
	</p:ajaxStatus>
    <ui:insert name="scripts"/>
    </body>
</f:view>
</html>